<?php

class Game extends Controller {

    function __construct() {
        parent::__construct();
        Session::init();
        $logged = Session::get('loggedIn');
        if ($logged == false) {
            Session::destroy();
            header('location: ../login');
            exit;
        }

        $this->view->js = array('public/js/default.js');
    }

    function index() {
        $this->view->render('game/index');
    }

    function logout() {
        Session::destroy();
        header('location: ../login');
        exit;
    }

    function eventsAjax() {
        $this->model->eventsAjax();
    }

    function gameTable() {
        $this->model->gameTable();
    }

   
 
}